//
//  UIButton+Extension.h
//  
//
//  Created by 王林峰 on 16/4/11.
//
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSUInteger, MKButtonEdgeInsetsStyle) {
    MKButtonEdgeInsetsStyleTop, // image在上，label在下
    MKButtonEdgeInsetsStyleLeft, // image在左，label在右
    MKButtonEdgeInsetsStyleBottom, // image在下，label在上
    MKButtonEdgeInsetsStyleRight // image在右，label在左
};

@interface UIButton (Extension)
/**
 *  设置button的titleLabel和imageView的布局样式，及间距
 *
 *  @param style titleLabel和imageView的布局样式
 *  @param space titleLabel和imageView的间距
 */
- (void)layoutButtonWithEdgeInsetsStyle:(MKButtonEdgeInsetsStyle)style
                        imageTitleSpace:(CGFloat)space;
+ (UIButton*) createCenterButtonWithFrame: (CGRect) frame Title:(NSString *)title Target:(id)target Selector:(SEL)selector;
+ (UIButton*)createCenterButtonWithFrame: (CGRect) frame image:(NSString *)image Title:(NSString *)title Target:(id)target Selector:(SEL)selector  size:(CGSize)size font:(CGFloat)font;
#pragma make UIButton图片文字水平垂直居中

+ (UIButton*) createButtonWithFrame: (CGRect) frame Image:(NSString *)image Title:(NSString *)title Target:(id)target Selector:(SEL)selector;

+ (UIButton*) createButtonWithImage:(NSString *)image Title:(NSString *)title Target:(id)target Selector:(SEL)selector;

+ (UIButton*) createButtonWithFrame: (CGRect) frame Target:(id)target Selector:(SEL)selector Image:(NSString *)image ImagePressed:(NSString *)imagePressed;


+ (UIButton *) createButtonWithFrame:(CGRect)frame Title:(NSString *)title Target:(id)target Selector:(SEL)selector;

+ (UIButton *) createButtonWithTitle:(NSString *)title Image:(NSString *)image Target:(id)target Selector:(SEL)selector;
+ (UIButton *)createSimpleButtonWithFrame:(CGRect)frame Title:(NSString *)title Image:(NSString *)image Target:(id)target Selector:(SEL)selector;
//设置UIButton长用的属性用于简化代码
+(UIButton *)setButtonWithFrame:(CGRect)frame Title:(NSString *)title Image:(NSString *)image Font:(CGFloat)font  Color:(UIColor *)color Target:(id)target Selector:(SEL)selector;
//普通版
+ (UIButton *)createNormalButtonWithFrame:(CGRect)frame Image:(NSString *)image Title:(NSString *)title font:(CGFloat)font imageSize:(CGSize)imageSize;
@end
